import request from '@/utils/request'

// 获取-员工列表
export const getEmployeeList = (params) => request.get('/sys/user', { params })

// 批量 - 导出员工excel
export const exportEmployee = () => request.get('/sys/user/export', { responseType: 'blob' })

// 下载员工导入模版
export const getExportTemplate = () => request.get('/sys/user/import/template', { responseType: 'blob' })

// 上传用户的excel
export const uploadExcel = (data) => request.post('/sys/user/import', data)

// 新增-员工
export const addEmployee = (data) => request.post('/sys/user', data)

// 删除-员工
export const delEmployee = (id) => request.delete(`/sys/user/${id}`)

// 获取员工详情
export const getEmployeeDetail = (id) => request.get(`/sys/user/${id}`)

// 修改员工基本信息
export const updateEmployee = (data) => request.put(`/sys/user/${data.id}`, data)

